export default [
  {
    path: '/user',
    layout: false,
    routes: [
      {
        name: 'login',
        path: 'login',
        component: 'user/Login',
      },
    ],
  },
  {
    path: '/capacity-control',
    name: 'capacity-control',
    access: 'deviceRouter',
    icon: 'QuestionCircleOutlined',
    routes: [
      {
        name: 'deviceManage',
        path: 'deviceManage',
        access: 'device',
        component: 'capacity-control/deviceManage',
      },
      {
        name: 'roadManage',
        path: 'roadManage',
        access: 'road',
        component: 'capacity-control/roadManage',
      },
      {
        name: 'berthManage',
        path: 'berthManage',
        access: 'space',
        component: 'capacity-control/berthManage',
      },
    ],
  },
  {
    path: 'data-manage',
    name: 'data-manage',
    access: 'heartRouter',
    icon: 'DatabaseOutlined',
    routes: [
      {
        name: 'deviceHeartbeat',
        path: 'deviceHeartbeat',
        access: 'heartbeat',
        component: 'data-manage/deviceHeartbeat',
      },
      {
        name: 'deviceIdentify',
        path: 'deviceIdentify',
        access: 'identify',
        component: 'data-manage/deviceIdentify',
      },
    ],
  },
  {
    path: '/batch-operate',
    name: 'batch-operate',
    icon: 'DatabaseOutlined',
    access: 'task',
    component: 'system/batch',
    routes: [{}],
  },
  {
    path: 'power',
    name: 'user',
    access: 'adminRouter',
    icon: 'UsergroupAddOutlined',
    routes: [
      {
        path: '/power',
        redirect: '/power/account',
      },
      {
        path: 'account',
        name: 'account',
        access: 'admin',
        icon: 'user',
        component: 'user/Admin',
      },
      {
        path: 'tenant',
        name: 'tenant',
        access: 'tenant',
        icon: 'user',
        component: 'Tenant/Tenant',
      },
      {
        path: 'tenantAccount',
        name: 'tenantAccount',
        access: 'tenant',
        icon: 'user',
        component: 'Tenant/TenantAccount',
      },
      {
        path: 'role',
        name: 'role',
        access: 'permission',
        icon: 'user',
        component: 'Auth/AuthRole',
      },
      {
        path: 'access',
        name: 'access',
        access: 'permission',
        icon: 'book',
        component: 'Auth/AuthPermission',
      },
      {
        path: 'department',
        name: 'department',
        access: 'department',
        component: 'user/Department',
      },
      {
        path: 'position',
        name: 'position',
        access: 'structure',
        component: 'user/Position',
      },
    ],
  },
  {
    path: 'system',
    name: 'system',
    access: 'system',
    icon: 'UsergroupAddOutlined',
    routes: [
      {
        path: '/system',
        redirect: '/system/config',
      },
      {
        path: 'config',
        name: 'config',
        access: 'config',
        component: 'system/config',
      },
      // {
      //   path: 'batch',
      //   name: 'batch',
      //   component: 'system/batch',
      // },
      {
        path: 'log',
        name: 'log',
        access: 'log',
        component: 'system/log',
      },
    ],
  },
  {
    path: '/',
    redirect: '/capacity-control/berthManage',
  },
  {
    hideInMenu: true,
    component: './404',
  },
];
